﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace PivotData.Tests
{
    [TestClass]
    public class FacetGategoryTest
    {
        [TestMethod]
        public void TestExpectedEqual()
        {
            var fc1 = new FacetCategory() { Name = "bogus", IsFilterVisible = true, IsMetaDataVisible = true, NumberFormat = "d", IsWordWheelVisible = false };
            var fc2 = new FacetCategory() { Name = "bogus", IsFilterVisible = true, IsMetaDataVisible = true, NumberFormat = "d", IsWordWheelVisible = false };
            Assert.AreEqual(fc1, fc2, "Should be equal");
        }

        [TestMethod]
        public void TestExpectedNotEqual()
        {
            var fc1 = new FacetCategory() { Name = "bogus", IsFilterVisible = true, IsMetaDataVisible = true, NumberFormat = "d", IsWordWheelVisible = false };
            var fc2 = new FacetCategory() { Name = "bogus", IsFilterVisible = false, IsMetaDataVisible = true, NumberFormat = "d", IsWordWheelVisible = false };
            Assert.AreNotEqual(fc1, fc2, "Should not be equal");
        }

        [TestMethod]
        public void TestDefaults()
        {
            var fc1 = new FacetCategory() { Name = "hi" };
            Assert.AreEqual("hi", fc1.Name, "Name");
            Assert.AreEqual("", fc1.NumberFormat, "number format");
            Assert.IsTrue(fc1.IsFilterVisible, "filter");
            Assert.IsTrue(fc1.IsMetaDataVisible, "meta");
            Assert.IsTrue(fc1.IsWordWheelVisible, "world");
        }
    }
}
